﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Lilium.RetailAudit.Data
{
	public static class EnumerationUtils
	{
		public static IEnumerable<T> PrependWithDefaultInstance<T>(this IEnumerable<T> src)
		{
			if (src == null) throw new ArgumentNullException("src");

			yield return Activator.CreateInstance<T>();
			foreach (var entity in src)
				yield return entity;
		}
	}
}